<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Logout extends TT_Controller {
	public function index()
	{
		$this->load->library('session');
		$this->session->unset_userdata('username');
		$this->session->unset_userdata('cust_role');
		$this->session->unset_userdata('logged_in');
		if($this->session->userdata('role') != NULL) {
			$this->session->unset_userdata('role');
			redirect('admin');
		}else redirect('home');
	}
}

/* End of file logout.php */
/* Location: ./application/modules/login/controllers/logout.php */